#include <iomanip>
#include <iostream>             
#include <cmath>
#include "Trip.h"

Trip::Trip()
{

}

Trip::~Trip()
{

}
int Trip::departure()
{
	return _departure;
}

int Trip::destination()
{
	return _destination;
}
 
double Trip::miles()
{
	return _miles;
}

double Trip::flights()
{
	return _flights;
}

double Trip::hours()
{
	return _hours;
}

std::string Trip::firstDate()
{
	return _firstDate;
}

std::string Trip::lastDate()
{
	return _lastDate;
}

double Trip::getRevFlights()
{
	return RevFlights;
}

double Trip::getRevHours()
{
	return RevHours;
}

std::string Trip::getRevFirstDate()
{
	return RevFirstDate;
}

std::string Trip::getRevLastDate()
{
	return RevLastDate;
}

#if 0
void Trip::setTrip(std::string Date, int newDep, int newDes, double newMiles, double newHours)
{
	Dep = newDep;
	Des = newDes;
	Miles = newMiles;
	Flights = 1;
	RevFlights = 0;
	RevHours = 0;
	Hours = newHours;
	FirstDate = Date;
	LastDate = Date;
}
#endif

void Trip::addTrip(std::string Date, double newHours)
{
	++_flights;
	_hours += newHours;
	_lastDate = Date;
}

void Trip::addRevTrip(std::string Date, double newRevHours)
{
	if(RevFlights == 0)
		RevFirstDate = Date;
	++RevFlights;
	RevHours += newRevHours;
	RevLastDate = Date;
}
